import request from '@/utils/request'

// 查询烟盒信息列表
export function listDetails(query) {
  return request({
    url: '/yh/details/list',
    method: 'get',
    params: query
  })
}

// 查询所有烟盒类型
export function getAllTypeList(query) {
  return request({
    url: '/yh/details/getAllType',
    method: 'get',
    params: query
  })
}

// 查询烟盒信息详细
export function getDetails(id) {
  return request({
    url: '/yh/details/' + id,
    method: 'get'
  })
}

// 新增烟盒信息
export function addDetails(data) {
  return request({
    url: '/yh/details',
    method: 'post',
    data: data
  })
}

// 修改烟盒信息
export function updateDetails(data) {
  return request({
    url: '/yh/details',
    method: 'put',
    data: data
  })
}

// 删除烟盒信息
export function delDetails(id) {
  return request({
    url: '/yh/details/' + id,
    method: 'delete'
  })
}
